package team.star.werespos.service;

import team.star.werespos.model.entity.OrderMaster;
import team.star.werespos.model.enums.TimeRangeEnum;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * OrderService interface<br/>
 *
 * @author hdonghong
 * @since 2019/05/04
 */
public interface OrderService {

    void insertOne(OrderMaster orderMaster);

    List<OrderMaster> listOrders(Integer orderId, Date startDate, Date endDate);

    void updateById(OrderMaster orderMaster);

    void deleteById(OrderMaster orderMaster);

    OrderMaster getOne(Integer orderId);

    void pay(Integer orderId);

    void cancel(Integer orderId);

    OrderMaster getByTableNum(Integer tableNum);

    void payByTableNum(Integer tableNum);

    void cancelByTableNum(Integer tableNum);

    Map<String, List> listByTimeRange(Integer year, TimeRangeEnum timeRangeEnum);
}
